package StringHomeWork;
//截取当前字符串中制定范围的字符串，含头去尾
public class SubStringDemo {
    public static void main(String[] args) {
        String str="Process finished with exit code ";
        int starts=str.indexOf("Pr");
        int ends=str.lastIndexOf("it");
        String name =str.substring(starts,ends);
        System.out.println(name);

    }

}
